using System;
using System.Windows.Forms;
using RollManager.Forms;
using System.Threading;
using System.Runtime.InteropServices;
using System.Diagnostics;

namespace RollManager
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            using( SingleProgramInstance spi = new SingleProgramInstance() )
            {
                if( spi.IsSingleInstance )
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault( false );
                    Application.Run( new MainForm() );
                }
                else
                {
                    spi.RaiseOtherProcess();
                }
            }
        }
    }
}